<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2024-06-04
Time: 16:10
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>注  册</title>
	<link type="text/css" rel="stylesheet" href="../../css/style.css" />
	<script type="text/javascript">
		function validateForm() {
			var userId = document.forms["registerForm"]["vuUserId"].value;
			var userName = document.forms["registerForm"]["vuUserName"].value;
			var password = document.forms["registerForm"]["vuPassword"].value;
			var confirmPassword = document.forms["registerForm"]["confirmPassword"].value;

			if (userId == "") {
				alert("用户ID必须填写");
				return false;
			}
			if (userName == "") {
				alert("用户名必须填写");
				return false;
			}
			if (password == "") {
				alert("密码必须填写");
				return false;
			}
			if (confirmPassword == "") {
				alert("确认密码必须填写");
				return false;
			}
			if (password !== confirmPassword) {
				alert("密码和确认密码不一致");
				return false;
			}
			return true;
		}
	</script>
</head>
<body>
<div id="header" class="wrap">
	<img src="../../images/logo.gif" />
</div>
<div id="navbar" class="wrap">
	<div class="search">
		<!--
            <form method="get" action="index.html">
                <input type="text" name="keywords" class="input-text" /><input type="submit" name="submit" class="input-button" value="" />
            </form>
        -->
	</div>
</div>
<div id="register" class="box">
	<h2>新用户注册</h2>
	<div class="content">
		<form name="registerForm" method="post" onsubmit="return validateForm();">
			<dl>
				<dt>用户ID：</dt>
				<dd><input type="text" class="input-text" name="vuUserId" value=""/></dd>
				<dt>用户名：</dt>
				<dd><input type="text" class="input-text" name="vuUserName" value=""/></dd>
				<dt>密码：</dt>
				<dd><input type="password" class="input-text" name="vuPassword" value=""/></dd>
				<dt>确认密码：</dt>
				<dd><input type="password" class="input-text" name="confirmPassword" value=""/></dd>
				<dt></dt>
				<dd><input type="submit" class="input-button" name="submit" value="" /></dd>
			</dl>
		</form>
		<div class="error">
			<!-- 这里可以放置服务器端返回的错误信息 -->
			<s:fielderror/>
		</div>
		<div class="error">
			<!-- 这里可以放置服务器端的操作错误信息 -->
			<s:actionerror/>
		</div>
	</div>
</div>
<div id="footer" class="wrap">
	北大青鸟 &copy; 版权所有
</div>
</body>
</html>